<template>
  <el-dialog title="地图" width="45%" @close="handleCloseDialog">
    <Map ref="mapContainer" class="map-container" v-bind="$attrs"></Map>
    <template #footer>
      <div class="dialog-footer">
        <el-button @click="handleCloseDialog">取 消</el-button>
      </div>
    </template>
  </el-dialog>
</template>

<script setup lang="ts">
import { ref, defineEmits } from "vue";
const emit = defineEmits(["update:modelValue", "loadData", "select-point"]);
import Map from "@/components/Map/index.vue";
const mapContainer = ref(null); // 地图容器

const handleCloseDialog = () => {
  emit("update:modelValue", false);
};
</script>

<style scoped lang="scss">
.map-container {
  width: 100%;
  height: 600px; /* 设置地图容器的高度 */
}
</style>
